<template>
  <div id="app">
    
       <nerbar :func="cheng" ref="menu" v-if="showmenu"></nerbar>
        <div class="content">
           <router-view/>
        </div>
      <tabbar ref="footer" v-if="showfooter"></tabbar>
  </div>

</template>

<script>
import nerbar from './components/pulic/nerbar.vue'
import tabbar from './components/pulic/tabbar.vue'
export default {
  name: 'App',
  data(){
    return{
      cheng:"首页",
      showfooter:true,
      showmenu:true
    }
  },
  watch: {
    $route(e){
      switch(e.name){
        case "login":
            this.showmenu=false
            this.showfooter=false
            break;
        case "register":
             this.showmenu=false
             this.showfooter=false
             break;
        default:
              this.showfooter=true
              this.showmenu=true
              break;
      }
    }  
  },
  methods: {
    // changeHeard(tel){
    //   this.cheng=tel,
    //   this.showfooter=tel
    // }
  },
  components:{
    nerbar,
    tabbar
  }
}
</script>

<style scoped>
.content{
  padding: .2rem 0 .2rem 0 ;
} 
#app{
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
     font-size: 12px; 
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
}
</style>

